Tracer control method

ABSTRACT

A plurality of path patterns (MCR 1  -MCR 3 ), in which at least data specifying tracing areas serve as variables, are registered in a memory (102) beforehand, tracer machining data including call instructions (MCC 1  -MCC 3 ) for calling a predetermined path pattern, as well as actual numbers, are stored in a memory (101) in advance, and tracer machining data are read block-by-block to perform tracer control. When a path pattern call instruction is read, the predetermined path pattern is read out of the memory (102), the variables are replaced by actual numbers to obtain a tracing area, and tracing is performed in the tracing area on the basis of the read path pattern.

BACKGROUND OF THE INVENTION

This invention relates to a tracer control method and, moreparticularly, to a tracer control method whereby any tracing pattern canbe simply created and tracer machining performed in accordance with thetracing pattern.

A tracer apparatus operates by causing a tracer head to trace a model,calculating velocity commands along various axes by means of a tracerarithmetic circuit using a deflection value sensed by the tracer head.The tracer apparatus controls driving motors for the corresponding axeson the basis of the velocity commands along these axes to transport atool relative to a workpiece, and repeats these operations to machinethe workpiece into a shape identical with that of the model. The tracingmethods (tracing patterns) that are available with the foregoing tracerapparatus are (a) manual tracing, (b) two-way scan tracing, (c) one-wayscan tracing, (d) 360° contour tracing, (e) partial contour tracing and(f) three-dimensional tracing. The conventional practice is to specifyone of the tracing methods (a) through (f), enter tracer machiningconditions, such as tracing velocity, reference deflection value,tracing direction, pick-feed value and pick-feed direction, as well asthe tracing area, and trace the specified pattern on the basis of thesedata. FIGS. 1(A), 1(B) and 1(C) show examples of two-way scan tracing,one-way scan tracing and 360° contour tracing, respectively. The tracingpattern for two-way scan tracing is specified by a combination ofapproach motion S1, tracing motion S2 in one direction, pick-feed motionS3, tracing motion S4 in the return direction, and pick-feed motion S5.The tracing pattern for one-way scan tracing is specified by acombination of approach motion S1, tracing motion S2, rapid-returnmotion S3 along the +Z axis, return motion S4 in a direction opposite totracing feed, rapid approach motion S5, and pick-feed motion S6. Thetracing pattern for 360° contour tracing is specified by a combinationof approach motion S1, contour tracing motion S2, and pick-feed motionS3.

Certain users have recently come to require tracer control based onpatterns other than the tracing patterns (a) through (f) describedabove. For example, as shown in FIG. 2, there is a requirement for atracer control method for repeating tracing in accordance with arectangular tracing pattern comprising scan tracing motion along the +Xaxis, scan tracing motion S2 along the -Y axis, scan tracing motion S3along the -X axis, and scan tracing motion S4 along the +Y axis. Incases such as the above-mentioned, the manufacturer is required on eachoccasion to redesign, or to modify the software of, the tracer apparatusso that tracer control conforming to the tracing pattern required byeach user can be implemented. However, offering a tracer apparatus foreach and every tracing pattern is a burden for the manufacturer. Theuser also is inconvenienced in that a single tracer apparatus cannot bemade to perform tracing tailored to the user's own tracing patterns.

SUMMARY OF THE INVENTION

Accordingly, an object of the present invention is to provide a tracingmethod whereby tracing conforming to a user's wishes can be performedwithout modification of equipment and in a simple manner.

Another object of the present invention is to provide a tracer controlmethod whereby various tracing patterns, in which at least dataspecifying tracing areas serve as variables, are registered or stored inmemory beforehand, a predetermined tracing pattern is called whileactual values are assigned to the variables, and tracer machining isperformed in an area specified by an actual value on the basis of thepattern called.

Still another object of the present invention is to provide a tracercontrol method whereby a tracing pattern can be created at will andregistered or stored in memory beforehand, which pattern can be calledfrom memory to enable tracing based on the pattern.

The present invention provides a tracer control method whereby aplurality of tracing patterns, in which at least data specifying tracingareas serve as variables, are registered or stored in memory beforehand,a predetermined tracing pattern is called while actual values areassigned to the variables, and tracer machining is performed in atracing area specified by an actual values on the basis of the tracingpattern called.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1, including FIGS. 1(A)-1(C), are a tracing diagram for describingconventional tracing patterns;

FIG. 2 is a tracing diagram for describing a tracing pattern notavailable in the prior art;

FIG. 3 is a simplified view of a tracing machine tool to which thepresent invention can be applied;

FIG. 4 is a diagram for describing the general features of the presentinvention;

FIG. 5, including FIGS. 5(A)-5(H), are diagrams for describingpre-registered tracing patterns;

FIG. 6 is a diagram for describing tracing machining data as well as acustom macro specifying a tracing pattern;

FIG. 7 is a flowchart illustrating a custom macro;

FIG. 8 is a simplified block diagram illustrating an embodiment of thepresent invention;

FIG. 9 is a block diagram illustrating another embodiment of the presentinvention, and

FIG. 10 is a flowchart of processing according to the present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 3 is a simplified view of a tracing machine tool to which thepresent invention can be applied. The tracing machine tool is providedwith an X-axis motor XM for driving a table TBL along the X axis, aZ-axis motor ZM for driving, along the Z axis, a column CLM mounting atracer head TC and a cutter head CT, a Y-axis motor YM for moving thetable TBL along the Y axis, a pulse generator PGX for generating asingle pulse P_(x) whenever the X-axis motor XM rotates by apredetermined amount, a pulse generator PGZ for generating a singlepulse P_(z) whenever the Z-axis motor ZM rotates by a predeterminedamount, and a pulse generator PGY for generating a single pulse P_(y)whenever the Y-axis motor YM rotates by a predetermined amount. Securedto the table TBL are a model MDL and a workpiece WK. The tracer head TCcontacts and traces the surface of the model MDL, and the cutter head CTcuts the workpiece WK in accordance with the shape of the model. Asknown in the art, the tracer head TC is arranged to sense deflectionε_(x), ε_(y), ε_(z) along the respective X, Y and Z axes of the surfaceof model MDL, and the deflection along the various axes sensed by thetracer head TC is applied to a tracer control unit TCC, which performsknown tracing calculations to generate velocity components alongrespective axes. For example, as a tracing method, let us consider thetwo-way scan tracing on the X-Z plane of FIG. 1(A). Two-way tracing isperformed by generating velocity components V_(x), V_(z), and applyingthese to the X- and Z-axis motors MX, MZ via servo circuits SVX, SVZ,respectively, whereby the motors MX, MZ are driven into rotation. As aresult, the cutter head CT is transported relative to the workpiece WKto cut the workpiece to the shape of the model MDL, and the tracer headTC traces the surface of the model.

Pulses P_(x), P_(y), P_(z) generated by the respective pulse generatorsPGX, PGZ, PGY are applied to present or current position registers forthe various axes, the registers, which are not shown, are incorporatedwithin the tracer control unit TCC. Upon receiving the pulses P_(x),P_(y), P_(z) as inputs thereto, each present position register has itsstatus updated, that is counted up or counted down depending upon thedirection of travel. When a present position X_(a) along the X axisbecomes equivalent to an X coordinate value XL₁ [FIG. 1(A)] of a firstboundary point of a tracing area, the tracer control unit TCC takes thetracing plane as the Y-Z plane and generates velocity components V_(y),V_(z). The velocity component V_(y) is applied to a servo circuit SVY,as a result of which the table TBL is moved along the Y axis to performscan in the Y-Z plane. When the distance traveled by the table TBL alongthe Y axis becomes equivalent to a pick-feed value P [FIG. 1(A)], thetracer control unit TCC subsequently takes the tracing plane as the X-Zplane and generates velocity components V_(x), V_(z) to perform returntracing until the present position along the X axis comes into agreementwith an X-axis coordinate value XL₂ of a second boundary point of atracing area. Thereafter, pick-feed, scan tracing in one direction,pick-feed and scan tracing in the other direction are repeated to bringthe present position along the Y axis to a boundary point (Y_(L)) alongthe Y axis. With the arrival at the boundary point (Y_(L)), two-way scantracing ends.

According to the present invention, various basic path patterns fortracing, or path patterns comprising a combination of basic pathpatterns, are pre-registered in a memory as custom macros, or tracerhead path patterns created by a predetermined program language arepre-registered in a memory as custom macros, a registered path patternis called in response to simple tracer machining program data, andtracing is executed on the basis of this path pattern. In this case,machining condition data such as tracing area data, tracing velocity andpick feed are stored as variables and registered in a memory togetherwith path patterns, and a prescribed path pattern is called from thememory while actual values are assigned to the variables. A custom macrois a subprogram or subroutine for specifying a tracing path pattern andis created by program commands in which variables can be used. A custommacro is called by a command in a main program such as a tracingmachining program and the variables in the custom macro are set as theactual values specified in the main routine. Tracing machining isperformed based on the custom macro called using the actual values.

FIGS. 4 and 5 are views for describing the general features of thepresent invention. In FIG. 4, numeral 101 denotes a memory which storesa tracing machining program, and numeral 102 denotes a path patternmemory in which there are registered named custom macros MCR₁, MCR₂ . .. specifying various path patterns.

As examples of path patterns, FIG. 5(A) shows a PG,9 rectangular scantracing pattern, FIGS. 5(B) through (D) show tracing patterns in whichcontour tracing (a) and scan tracing (b) are linked, and FIG. 5(E) showsa two-way scan tracing pattern. In addition, tracing motion may bedivided into the smallest basic motion units that are significant interms of tracing machining, and the basic motion units may be stored asthe path patterns. FIGS. 5(F) through (H) show examples of suchpatterns, in which (F) shows a scan tracing pattern for one directionwith tracing direction and tracing area serving as variables, (G) showsa contour tracing pattern for a maximum of one revolution with tracingdirection and tracing area serving as variables, and (H) shows athree-dimensional tracing pattern for a maximum of one revolution withtracing direction and tracing area serving as variables. It should benoted that the motion patterns shown in FIGS. 5(A) through (E) arecreated by combining basic motion patterns. If we assume that thetracing motion in one direction illustrated in FIG. 5(F) is expressed bya one-way tracing motion instruction H02, tracing direction data,tracing area data and tracing velocity, namely that the tracing motionin one direction illustrated in FIG. 5(F) is expressed by the following:

H02 [tracing direction data] [tracing area data] [tracing velocitydata];

then the custom macro of the path pattern shown in FIG. 5(A) will beexpressed by the following: ##EQU1## This custom macro is stored in thepath pattern memory 102. Note that 9001 is a path pattern number.

Inserted at suitable locations (three in the illustration) of themachining program stored in the memory 101 are macro call data MCC₁,MCC₂, MCC₃ for calling the path patterns (custom macros) stored in thepath pattern memory 102. It is thus arranged so that a prescribed pathpattern may be called from the memory 102. If the path pattern number9001 [the number specifying the pattern of FIG. 5(A)] is to be called,then an item of macro call data would consist of a macro call commandG65, the number P9001 of the path desired to be called, and an actualargument command for assigning actual values to the variables, the calldata having the following configuration:

    G 65 P9001 X.sub.1 =□ . . . □, Y.sub.1 =□ . . . □, F.sub.1 □ . . . □

where X₁, Y₁, Z₁ denote variables used in custom macro (A) above. Actualvalues are assigned to the variables by X₁ =□ . . . □, Y₁ =□ . . . □, F₁=□ . . . □, thereby completing the path pattern shown in custom macro(A) above. The program shown in FIG. 4 is executed in the sequence a, b,c, b, d, e, f.

FIG. 6 is a view for describing machining data and a custom macro in acase where tracing is performed along the path pattern shown in FIG. 2.The following tracing machining program data are stored in the memory101:

    G901 Z-0 F . . . ;                                         (B)

    G65 P9002 A . . . B . . . C . . . ;                        (C)

    M02;                                                       (D)

where (B) is a block for an approach command, in which approach isindicated by the G-function instruction G901, approach along the Z axisis indicated by Z-0, the minus sign being the direction traveled for theapproach. The approach velocity is indicated by a numerical value whichfollows the letter of the alphabet F. (C) is a command block for callinga path pattern, in which G65 is a macro call instruction, and thenumerical value 9002 following the letter of the alphabet P is a pathpattern number. The letters of the alphabet A, B, C are word addresswords for assigning actual values to the variables used in a custommacro for specifying a path pattern. The numerical values which followthe word address words A, B, C specify L_(o), pitch P and minimum pathlength .sub.Δ P in one direction, respectively, these variables beingindicated in FIG. 2. (D) is a command block indicating end of machiningcommand data, in which M02 is an M-function instruction indicatingprogram end. It should be noted that correspondence between word addresswords A, B, C . . . of (C) and variables used in a custom macro arestored in memory beforehand. By way of example, the word address wordsA, B, C correspond to variable #1, #2, #3, respectively.

Stored in the path pattern memory 102 is the following custom macroinstruction for specifying the path pattern shown in FIG. 2: ##EQU2##Note that (E) is a block specifying the name of the custom macro, inwhich the custom macro number is specified by the numerical valuefollowing the letter of the alphabet O. Further, (F), (G), (H) areblocks for storing L_(o), P, .sub.Δ P, which are specified by the wordaddress words A, B, C in the custom macro call block contained in thetracer machining program, in registers corresponding to variables #101,#102, #103, respectively. (I) is a command block designating executionof one-way scan tracing, in which one-way scan tracing is indicated byG903, tracing direction and tracing area are designated by the numericalvalues and their signs following the letters of the alphabet X, Y,various machining conditions, which have been preset in another locationof the memory, are selected by the numerical value following the letterof the alphabet Q, and tracing velocity is specified by the numericalvalue following the letter of the alphabet F. (J) is a block indicatingthe end of the custom macro, in which a custom macro end is commanded byM99. An instruction group PR1 between (H) and (I) is for moving thetracer head along the path pattern of FIG. 2, and is created usingvariables #101 (=L_(o)), #102 (=P), #103 (=.sub.Δ P). A flowchart forthe creation of the instruction group PR1 is illustrated in FIG. 7.

(a) First, the operations L_(o) →L, 0→1 are performed.

(b) Next, it is determined whether i is 0, 1, 2 or 3.

(c) If i=0 holds, this indicates scan tracing in the +X direction, andtracer head traveling distances x, y along the X and Y axes arecalculated by performing the following operations:

    L+P→x

    0→y

(d) This is followed by performing the following operation to incrementi by one:

    i+1→i

(e) Thereafter, the tracer control unit TCC (FIG. 3) is supplied withthe data (G903) indicative of the tracing method specified by block (I),the values of x and y obtained in step (c), tracing velocity (e.g.,100), and various tracing conditions corresponding to the machiningcondition data Q2. The tracer control unit TCC recognizes from G903 thatthe operation is one-way scan tracing, and analyzes x and y. Scantracing along the +X direction in the X-Z plane is performed if x>0 andy>0 are true, scan tracing along the -Y direction in the Y-Z plane isperformed if x=0 and y<0 are true, scan tracing along the -X directionin the X-Z plane is performed if x<0, y=0 are true, and scan tracingalong the +Y direction in the Y-Z plane is performed if x=0 and y>0 aretrue. Scan tracing is ended if the traveling distance along the X axisor along the Y axis becomes |x| or |y|.

(g) When scan tracing in a predetermined direction ends, the decisionstep (b) is executed.

(h) If the decision rendered in step (b) is that i=1 is true, then thisindicates scan tracing in the -Y direction. Therefore, the operations0→x, -L→y are performed, and processing is executed from step (d)onward.

(i) If the decision rendered in step (b) is that i=2 is true, then thisindicates scan tracing in the -X direction. Therefore, the operations-L→x, 0→y are performed, and processing is executed from step (d)onward.

(j) If the decision rendered in step (b) is that i=3 is true, then thisindicates scan tracing in the +Y direction. Therefore, the followingoperations are performed:

    0→x

    L-P→y

to calculate the traveling distances x, y of the tracer head along the Xand Y axes, respectively.

(k) Next, y and .sub.Δ P are compared in magnitude. If y<.sub.Δ P istrue, the final instruction M99 is read and tracing machining inaccordance with the path shown in FIG. 2 is ended.

(m) If y>.sub.Δ P is true, on the other hand, then the followingoperations are performed:

    L-2P→L

    0→i

and processing is executed from step (d) onward.

By virtue of the foregoing steps (a) through (m), the tracer head istransported along the rectangular path pattern shown in FIG. 2.

FIG. 8 is a block diagram illustrating the tracer apparatus TCC, inwhich numeral 101 denotes the memory storing tracer machining data, 102the path pattern memory, 103 a processor, 104 servo circuitry for eachaxis, 105 a motor for each axis, 106 a tracer head, and 107 a pulsegenerator for each axis. When the apparatus is started, the processor103 reads the tracer machining program data out of the memory 101 insequential fashion and performs ordinary tracer control. When macro calldata "65 . . . . . . . . . " is read out of the memory 101, theprocessor 103 goes to the the path pattern memory 102 to read out thepath pattern (custom macro) having the macro number indicated by thecall data. The processor 103 then executes tracer processing whileinserting actual values into the variables of the custom macro. Forexample, if we assume that the path pattern (custom macro) readcorresponds to the path shown in FIG. 5(A), then one-way tracing willtake place initially in the X-Z plane. Therefore, feed velocity commandsV_(x), V_(z) are applied to the servo circuit 104 to transport the tableTBL and the column CLM (FIG. 2). As a result, the tracer head 106 ismoved along the model, so that the tracer head produces axialdeflections ε_(x), ε_(y), ε_(z), which enter the processor 103. Theprossor 103 executes tracer computations based on the deflection tocalculate new feed velocities V_(x), V_(z) in real time, these beingdelivered to the servo circuit 104. It should be noted that control iseffected such that the feed velocity V_(x) varies in inverse proportionto the value of |ε-ε_(o) | (where ε is the resultant deflection andε_(o) is the reference deflection), and such that the feed velocityV_(z) varies in proportion to the value of |ε-ε_(o) |. The servo circuit104 controls the table TBL and column CLM on the basis of V_(x), V_(z).Thus, machining proceeds by successively executing tracer computationsbased on the deflection of the tracer head 106, calculating velocitycommands V_(x), V_(z) based on deflection along the model as sensed bythe tracer head, and driving the motor for each axis to move the cutterhead relative to the workpiece, whereby the workpiece is machined to ashape identical with that of the model. When the tracer head 106 travelsa distance indicated by the area data X₁, tracing in the X-Z plane alongthe +X direction is ended, followed by execution of tracing in the Y-Zplane along the -Y direction. Thereafter, through processing similar tothe above, tracing along the rectangular pattern of FIG. 5(A) isperformed.

FIG. 9 is a block diagram illustrating another embodiment of the presentinvention.

Numeral 201 denotes a tracer command unit constituted by a microcomputerand having a processor 201a, a ROM 201b storing a control program, anon-volatile memory 201e storing plural sets of machining conditions, adigital input (DI) unit 201f, a digital output (DO) unit 201g, anexternal output register 201h, an operator's panel 201i and an inputunit such as a tape reader 201j. Stored beforehand in the non-volatilememory 201c are custom macros specifying a variety of path patterns.Tracing machining program from the operator's panel 201i or from thetape reader 201j are input to the RAM 201d in advance. Stored beforehandin the memory 201e are plural sets of machining condition data Q_(i)(i=1, 2, . . . ), each set of machining conditions containing areference deflection value ε_(o), a tracing plane, a tracing direction,a pick-feed direction, a pick-feed value and the like. The data Q_(i)are stored with correspondence affixed thereto.

Numeral 301 denotes a tracer control unit which includes a deflectionresultant circuit 301a, an adder 301b, velocity signal calculatingcircuits 301c, 301d, a direction deriving circuit 301e, a velocitycalculating circuit 301f for velocity along each axis, an approachvelocity generating circuit 301g, an interpolating circuit 301h, acomparator 301i, present position registers 301j, 301m, 301n forrespective axes, and a position monitoring circuit 301p.

Using the axial deflections ε_(x), ε_(y), ε_(y) produced by the tracerhead, the deflection resultant circuit 301a generates the resultantdefection value ε by performing the operation indicated by the followingequation: ##EQU3## The adder 301b calculates the difference (=ε-ε_(o))between the resultant deflection value ε and the reference deflectionvalue ε_(o), and applies the result to the velocity signal calculatingcircuits 301c, 301d. The velocity signal calculating circuit 301cproduces a velocity signal V_(T) having the commanded tracing velocity Fwhen the difference (ε-ε_(o)) is zero, and a velocity signal V_(T) whichis inversely proportional to the difference when ε-ε_(o) ≠0 is true. Thevelocity signal calculating circuit 301d produces a velocity signalV_(N) which is proportional to the difference (ε-ε_(o)). The directionderiving circuit 301e uses the deflection signals ε_(x), ε_(y) along theX and Y axes to calculate deflection direction signals sin θ, cos θ byperforming the operations given by the following equations: ##EQU4## Thevelocity calculating circuit 301f uses the velocity signals V_(T), V_(N)and the deflection direction signals sin θ, cos θ to generate velocitysignals V_(a), V_(b) along the respective axes by performing theoperations given by the following equations:

    V.sub.a =V.sub.T ·sin θ+V.sub.N ·cos θ(4)

    V.sub.b =-V.sub.T ·cos θ+V.sub.N ·sin θ(5)

The approach velocity signal generating circuit 301g generates anapproach velocity signal V_(A) conforming to a commanded approachvelocity Fa. The interpolating circuit 301h interpolates V_(a), V_(b),V_(A) along each axis based on the tracing method, tracing plane,tracing direction and pick-feed direction. For two-way scan tracing inthe X-Z plane, (a) V_(a) is delivered as the X-axis feed velocity V_(x)and V_(b) as the Z-axis feed velocity V_(z) when tracing motion alongone direction prevails, (b) V_(a) is delivered as the Y-axis feedvelocity V_(y) and V_(b) as the Z-axis feed velocity V_(z) whenpick-feed prevails, and (c) -V_(a) is delivered as the X-axis feedvelocity V_(x) and V_(b) as the Z-axis feed velocity V_(z) when tracingmotion in the return direction prevails. For contour tracing in the X-Yplane, the interpolating circuit 301h delivers V_(a) as the X-axis feedvelocity V_(x) and V_(b) as the Y-axis feed velocity V_(y). Further, theinterpolating circuit 301h delivers the approach velocity signal V_(A)as the Z-axis feed velocity V_(z) when approach is performed. Thecomparator 301i compares the resultant deflection value ε with apredetermined deflection value ε_(a) and produces an approach end signalAPDEN as an output when ε≧ε_(a) is true. The present position registers301j, 301m, 301n for respective axes record present positions X_(a),Y_(a), Z_(a) along the respective axes by counting up or down, dependingupon direction of rotation, pulses P_(x), P_(y), P_(z) generatedwhenever motors for respective axes rotate by a predetermined amount.The position monitoring circuit 301p produces a motion end signalT_(DEN) upon performing a monitoring operation to determine whether ornot the tracer head has arrived at a boundary point of a tracing areawhen tracing motion is in effect, and whether or not the tracer head hastraveled a pick-feed distance when a pick-feed is in effect. It shouldbe noted that a sequence circuit incorporated within the interpolatingcircuit 301h counts the approach end signal APDEN and the motion endsignal T_(DEN) to interpolate V_(a), V_(b) along each axis on the basisof the counted values, tracing method, tracing plane, etc.

Next, the operation of FIG. 9 will be described for a case where tracermachining is performed in accordance with the tracing pattern shown inFIG. 2. FIG. 10 is a flowchart of the associated processing.

(A) When a start button (not shown) on the operator's panel is pressed,the processor 201a performs the operation 1→r and reads an r-th block oftracing machining program data out of the RAM 201d.

(B) Next, the processor determines whether the r-th block of tracingmachining program data is M02; if it is, tracer processing is ended.

(C) If the r-th block of tracing machining program data is not M02, onthe other hand, then it is determined whether the r-th block of tracingmachining program data contains G65.

(D) If G65 is not contained in the data, ordinary tracer processing isperformed. Specifically, the processor 201a delivers the tracingmachining program data to the external output register 201h through theDO unit 201g. The data stored in the external output register 201h areapplied to each location of the tracer control apparatus 301. Since thefirst block of tracing machining program data will be an approachcommand, the approach velocity signal generating circuit 301g producesthe approach velocity signal V_(A), which conforms to the numericalvalue following the letter of the alphabet F in the r-th (1st) block.Since the motion is approach motion (G903) and the approach direction isalong the -Z axis, the interpolating circuit 301h produces -V_(A) as theZ-axis feed velocity V_(z). As a result, the tracer head approaches andcontacts the model, whereupon the deflection resultant circuit 301aproduces the resultant deflection ε. The comparator 301i compares ε andε_(a) and produces the approach end signal APDEN if ε≧ε_(a) is true. Asa result, the interpolating circuit 301h performs the operation V_(z)=0, thereby stopping the tracer head.

The approach end signal APDEN is read by the processor 201a through theDI unit 201f.

(E) When the approach end signal APDEN is generated, the processor 201aperforms the following operation:

    r+1→r

to increment r by one, reads the r-th block of tracing machining programdata out of the RAM 201d, and performs processing from step (B) onward.

(F) If the decision rendered in step (C) is that the r-th block containsthe custom macro call instruction G65, the the processor 201a assignsactual values to the variables, reads from the memory 201c the custommacro instruction group having the number following the letter of thealphabet P, and executes processing conforming to these instructions.Since the second block of tracing machining program data will containthe custom macro call instruction G65, the processor 201a inserts thenumerical values L_(o), P, .sub.Δ P, which follow the letters of thealphabet A, B, C, into the RAM 204d at storage areas corresponding tothe variables #1, #2, #3, respectively. The processor then sequentiallyreads the group of custom macro instructions having the number followingthe letter of the alphabet P and performs the process steps (a) through(m).

In step (e), each item of data is stored temporarily in the externaloutput register 201h and is then applied to each section of the tracercontrol apparatus 301. In addition, various tracing conditionscorresponding to the machining condition data Q_(i) (i=1, 2, . . . ) areread out of the memory 201e and stored in the external output register201h.

(G) When tracing based on the instructions of the custom macro isperformed and the condition y<.sub.Δ P is established, an instructionM99 indicating custom macro end is read. Upon discriminating M99, theprocessor 201a performs the following operation:

    r+1→r

to increment r by one, reads the r-th block of tracing machining programdata out of the RAM 201d, and executes processing from step (B) onward.

(H) If the decision rendered in step (B) is that the r-th block containsM02, the processor 201a regards this as indicating the end of tracerprocessing and produces a termination signal to complete tracermachining processing.

Thus, according to the present invention, a variety of path patterns arepre-registered in memory upon being converted into macro form. Thismakes it possible to execute tracing in accordance with complex pathsmerely by inserting macro call instructions in machining program atsuitable locations, and inserting data which replaces the variables withactual values, or in other words, by means of a simple command.Furthermore, creation of machining command information is simplifiedbecause a registered macro can be called and used any number of times.

Further, according to the present invention, tracer control conformingto any tracing path can be performed in simple fashion by using aregistered macro, thereby making it unnecessary to modify the apparatusand change the software design.

In the description given above, machining conditions are not dealt withas variables. However, it is possible to construct a custom macro inwhich tracing conditions such as tracing velocity and pick-feed valueserve as variables.

The present invention makes it possible to perform tracing in accordancewith an arbitrary tracing pattern without modifying equipment andwithout alteration of software. The invention is therefore well-suitedfor use in controlling a tracing machining tool.

We claim:
 1. A tracer control method for performing tracing machining in accordance with a tracing machining program comprising a plurality of blocks, said method comprising the steps of:preregistering, in a memory, a plurality of tracing path patterns in which at least data specifying tracing areas serve as variables; inserting, in the tracing machining program, command data for calling one of the tracing path patterns and assigning actual values to variables which are used in the path pattern called; reading out tracing machining program data block by block and performing tracing machining in accordance with the data; calling a tracing path pattern specified by the command data and assigning actual values specified by the command data to variables used in the path pattern called when the command data for calling a tracing path pattern and assigning the actual values to the variables in the tracing path pattern is read; and performing tracing machining in a tracing area specified by the actual values, on the basis of the tracing path pattern called.
 2. A tracer control method according to claim 1, wherein tracer head path data is created in a predetermined language using the variables and is registered in the memory as the tracing path pattern.
 3. A tracer control method according to claim 1, wherein the tracing path pattern is a predetermined basic training motion pattern derived when a variety of tracing motions are divided into the smallest basic motions that are significant in terms of tracing machining.
 4. A tracer control method according to claim 1, wherein the tracing path pattern is a pattern comprising a combination of basic motions derived when a variety of tracing motions are divided into the smallest basic motions that are significant in terms of tracing machining.
 5. A tracer control method according to claim 1, wherein the tracing path pattern includes machining conditions expressed as variables. 